package game.leon.war.node.meta;

/**
 * User: bianpeng
 * Date: 12-1-31
 */
public class Fighter {
    private int id;
    /// 位置信息
    private int team;
    private int col;
    private int row;
    // 名字
    private String name;
    // 血量
    private int hp;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTeam() {
        return team;
    }

    public void setTeam(int team) {
        this.team = team;
    }

    public int getCol() {
        return col;
    }

    public void setCol(int col) {
        this.col = col;
    }

    public int getRow() {
        return row;
    }

    public void setRow(int row) {
        this.row = row;
    }
    
    public int getSeat() {
        assert team > 0 && team < 10;
        assert col > 0 && col < 10;
        assert row > 0 && row < 10;
        return team * 100 + col * 10 + row;
    }
    
    public void setSeat(int seat) {
        assert seat > 0 && seat < 1000;
        team = seat / 100;
        col = (seat / 10) % 10;
        row = seat % 10;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }
}
